Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support transactions #20

Merged
merged 17 commits into from
Apr 23, 2021
Merged

Support transactions #20

merged 17 commits into from
Apr 23, 2021

Conversation

YordanPavlov
Copy link
Contributor

@YordanPavlov YordanPavlov commented Apr 20, 2021

This PR adds Kafka transaction support to san-exporter. We need this to provide 'exactly once' semantic.

The bigger work related with this PR has been happening in Node-rdkafka. The library is a wrapper over Librdkafka which supports transactions, but that support needs to be brought to JS. I have been trying to do this in this PR:
Blizzard/node-rdkafka#881
If you feel like doing so, please also comment there. My PR is still not accepted so for now we use an NPM from our own NPM repo: @santiment-network/node-rdkafka.

Also in this PR I have done some fixes:

  • Zookeeper client is now a member instead of global variable. Global variable was causing weird problems in integration tests, when the san-exporter is dropped and created again.
  • I have added an example for using transactions and also made the examples runnable as a sort of test.
  • Added a helper method to subscribe for message delivery.

P.S. I am tagging more people for this PR, because we have bigger plans for san-exporter. The idea is for it to gradually absorb all other exporters into a single higher quality repository which people outside of Santiment would use. So any feedback is welcome.

Copy link

@apozdeyev apozdeyev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@YordanPavlov YordanPavlov merged commit 76923bd into master Apr 23, 2021
@delete-merged-branch delete-merged-branch bot deleted the supportTransactions branch April 23, 2021 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants